import store  from "@/store";
const MarkDownData ={
     
    template: {
        title: '模板',
        icon: 'el-icon-document',
        action(editor) {
          editor.insert(function (selected) {
            const placeholder = '请输入文本';
            const content = selected || placeholder;
            const data =
                            '# 我的第一个MarkDown文件\n'+
                            '\n## 列表\n'+
                            '- 无序列表\n'+
                            '1. 有序列表\n'+
                            '\n## 表格\n'+
                            '|let|var|const|\n'+
                            '|-|-|-|\n'+
                            '|有块级作用域|变量提升|不能修改值|\n'+
                            '\n## 链接\n'+
                            '[百度官网](http://www.baidu.com)\n'+
                            '\n## 提示\n'+
                            '::: tip\n'+
                            '在此输入内容\n'+
                            ':::\n'+
                            '::: warning\n'+
                            '在此输入内容\n'+
                            ':::\n'+
                            '::: danger\n'+
                            '在此输入内容\n'+
                            ':::\n'
                          
               
            return {
              text: `${data}`,
              selected: content,
            };
          });
        },
      },

      history: {
        title: '草稿箱',
        icon: 'el-icon-suitcase',
        action(editor) {
          editor.insert(function (selected) {
            const placeholder = '请输入文本';
            const content = selected || placeholder;
            const data = localStorage.getItem('MarkDownHistory') || ''
            return {
              text: `${data}`,
              selected: content,
            };
          });
        },
      },
}
export default MarkDownData